package com.study.Util;

import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.study.common.BusinessException;
import org.apache.commons.lang3.StringUtils;

import java.io.File;
import java.util.stream.Stream;

/**
 * @Author hupengming
 * @ClassName Asserts
 * @Date 2022-12-01  13:55
 * @Version 1.0
 */
public class Asserts {

    public static void isNull(Object obj,String msg){
        if(ObjectUtils.isNull(obj)){
            throw new BusinessException(msg);
        }
    }

    public static void isEmpty(String target,String msg){
        if(StringUtils.isEmpty(target)){
            throw new BusinessException(msg);
        }
    }

}
